BUILD=./build
SRC=./src
NVCC=/usr/local/cuda-6.5/bin/nvcc
#NVCC=nvcc

compile:
	printf 'compiling..\n'
	rm -rf $(BUILD)
	mkdir $(BUILD)
	gcc $(SRC)/seq.c -o $(BUILD)/seq
	gcc $(SRC)/io_test.c -o $(BUILD)/io_test
cuda: compile
	@$(NVCC) $(SRC)/par-cuda.cu -o $(BUILD)/cuda
	printf 'running CUDA test script..\n'
	rm -rf ./outputs/cuda
	mkdir outputs/cuda
	./test_cuda.sh 
mpi: compile
	mpicc $(SRC)/par-mpi.c -o $(BUILD)/mpi
	printf 'running MPI test script..\n'
	rm -rf ./outputs/mpi
	mkdir ./outputs/mpi
	./test_mpi.sh 
clean:
	rm -rf outputs/*
	rm -rf build/*
